<?php
    include 'connect.php';
    if (isset($_GET['utility_id']) && is_numeric($_GET['utility_id']) && $_GET['utility_id'] > 0) {
        $id = $_GET['utility_id'];
        $result = mysql_query("SELECT * FROM utility WHERE utility_id=$id") or die(mysql_error()); 
        $row = mysql_fetch_array($result);
        if($row) {
            $nome = $row['utility_nome'];
            $url = $row['utility_url'];
        }
    }
?>
            <script type="text/javascript" src="./plugin/validation/jquery.js"></script>
            <script type="text/javascript" src="./plugin/validation/jquery.validate.js"></script>
            <div id="info-bar-small">Modifica collegamento in modulo utility</div>
            <div id="main">
                <form method="post" action="./includes/action_edit_utility.php?utility_id=<?=$id;?>">
                    <div id="view-profile">
                        <span class="link-option">Testo </span><input type="text" name="nome" value="<?php echo $nome; ?>" style="margin-top: 20px;" class="edit-link" required /><br />
                        <span class="link-option">Url </span><input type="text" name="url" value="<?php echo $url; ?>" style="width: 369px;" class="edit-link" required /><br />
                        <div class="floatright"><input type="submit" name="submit" value="Salva Modifiche" class="post-button"></div>
                    </div>
                </form> 
            </div>